<?php


class Zend_View_Helper_DishOfLocation extends Zend_View_Helper_Abstract
{


	public function dishOfLocation(Model_LocationOfDish $d)
	{
		//$name=$d->getDish()->getName();
		$name=$d->getName();
		$des=$d->getDescription();
		$quantity=$d->getQuantity();
		$price=$d->getPrice();
		$image=$d->getImage();
		$link= "/dish/detail";
		$link=$link.'?id='.$d->getDish()->getId();
		$id=$d->getId();
		$result='
				<div class="LocationOfDish">
					<img src="'.$image.'"></img>
					<div class="locationInfo">
						<span class="locationTitle-small"><a href="'.$link.'">'.$name.'</a></span> <br />
						<span class="locationAddress-small">'.$des.'</span> <br />
						Price: <span class="price">'.$price.'đ</span> <br />
						Quantity: <span class="quantity">'.$quantity.'</span> <br />
								<div class="locationInfo">
									<form method="get" action=""  class="frm"  id="frm'.$id.'">
										<span>Quantity:</span>
										<input type="text" class="txtNumber" id="quantity" name="quantity" />
										<input type="hidden" class="txtNumber" id="id" value="'.$id.'" name="id" />
												<input type="hidden" class="txtNumber" id="maxQuantity" value="'.$quantity.'" name="maxQuantity" />
										<button type="submit"  id="'.$id.'"  class="buttonbuy button">Buy</button>
									</form>
									<div id="errorStatus"></div>
								</div>
									
					</div>
					
					
							
				</div>
				';

		return $result;
	}

	

}
